<template>
	<view class="">
		<view class="fz30 z9">
			点击复制图标
		</view>
		<view class="parent">
			<view class="cen" v-for="sd in icons">
				<uni-icons :type="sd" size="30" color="#999" v-clipboard:copy="fuzhje(sd)" v-clipboard:success="onCopy"></uni-icons>
			</view>
		</view>
	</view>
</template>
<script>
	import icons from "@/components/uni-icons/icons.js"
	export default {
		data() {
			return {
				icons: []
			}
		},
		components: {},
		methods: {
			onCopy() {
				uni.showToast({
					title: "复制成功"
				})
			},
			fuzhje(type) {
				return `<uni-icons type="${type}" size="30" color="#999"></uni-icons>`
			}
		},
		mounted() {
			for (let i in icons) {
				this.icons.push(i)
			}
		}
	}
</script>
<style scoped>
	.parent {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		grid-template-rows: repeat(1, 1fr);
		grid-row-gap: 50rpx;
	}
</style>
